package com.linwancun.lwcyback.service;

import com.linwancun.lwcyback.mapper.HealthassessmentQuestionMapper;
import com.linwancun.lwcyback.model.HealthassessmentQuestion;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class HealthAssessmentQuestionServiceImpl implements HealthAssessmentQuestionService {
    @Resource
    private HealthassessmentQuestionMapper healthassessmentQuestionMapper;

    @Override
    public void insert(HealthassessmentQuestion object) {
        healthassessmentQuestionMapper.insert(object);
    }

    @Override
    public void save(HealthassessmentQuestion object) {
        healthassessmentQuestionMapper.updateByPrimaryKey(object);
    }

    @Override
    public List<HealthassessmentQuestion> getAll() {
        return healthassessmentQuestionMapper.list(new HealthassessmentQuestion());
    }

    @Override
    public HealthassessmentQuestion find(HealthassessmentQuestion object) {
        return healthassessmentQuestionMapper.find(object);
    }

    @Override
    public void delete(HealthassessmentQuestion object) {
        healthassessmentQuestionMapper.deleteByPrimaryKey(object.getQuestionid());
    }

    @Override
    public List<HealthassessmentQuestion> getList(HealthassessmentQuestion object) {
        return healthassessmentQuestionMapper.list(object);
    }
}
